package org.hairball.analysis;

import org.objectweb.asm.ClassReader;
import org.objectweb.asm.tree.ClassNode;

import java.io.IOException;
import java.io.InputStream;

public class ClassNodeFactory {
     public ClassNode getClassNodeForBytecode(InputStream classBytecode) throws IOException {
        ClassReader classReader = new ClassReader(classBytecode);
        ClassNode classNode = new ClassNode();
        classReader.accept(classNode, 0);
        return classNode;
    }

}
